Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to provide SDML Catalog path via an environment variable #18

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

mchaloupka
Copy link

This PR adds the ability to provide the path to SDML catalog via an environment variable. It just changes the implementation of the default resolver, so it either takes path from the environment variable if present or it looks in the current folder (and traverses through the parent folders).

I have added unit test that verifies this behavior. Have added dependency on serial_test as I need to ensure that the tests touching the environment variables are not running in parallel.

Disclaimer: the diff contains also #16 as that allows me to have working tests.

sdml-parse/Cargo.toml Outdated Show resolved Hide resolved
sdml-parse/src/load.rs Outdated Show resolved Hide resolved
Copy link
Member

@johnstonskj johnstonskj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the change to the Cargo.toml file and environment variable please and this should be an easy one.

@mchaloupka mchaloupka force-pushed the feature/catalog-from-env branch 2 times, most recently from 909dc4b to db5f18f Compare January 21, 2025 23:30
@mchaloupka
Copy link
Author

Can you make the change to the Cargo.toml file and environment variable please and this should be an easy one.

Done.

@mchaloupka mchaloupka force-pushed the feature/catalog-from-env branch from db5f18f to 36d639b Compare January 21, 2025 23:33
@mchaloupka mchaloupka force-pushed the feature/catalog-from-env branch from 36d639b to e8f5654 Compare January 21, 2025 23:37
@johnstonskj johnstonskj merged commit 36b60e7 into sdm-lang:main Jan 24, 2025
82 of 96 checks passed
@mchaloupka mchaloupka deleted the feature/catalog-from-env branch January 29, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants